package fr.unice.polytech.chord.core.responses.asynchronous;

/**
 * A generic boolean response.
 * 
 * @author Anthony Parisy
 * @author Laurent Pellegrino
 * @author Marc Valdener
 * 
 * @version 10/28/2009
 */
@SuppressWarnings("serial")
public class ActionResponseMessage implements AsynchronousResponseMessage {

	private boolean success = false;

	/**
	 * Constructor.
	 * 
	 * @param success
	 *            boolean that indicates if the actions has succeeded or not.
	 */
	public ActionResponseMessage(boolean success) {
		this.success = success;
	}

	/**
	 * Indicates if the action has succeeded or not.
	 * 
	 * @return <code>true</code> if the action has succeeded. <code>false</code>
	 *         otherwise.
	 */
	public boolean hasSucceeded() {
		return this.success;
	}

}
